package com.sgb.knowledgeshare.entity;

import com.contrarywind.interfaces.IPickerViewData;
import com.google.gson.annotations.SerializedName;

import java.util.List;

//各种筛选共用实体(五花八门)
public class ShareDictEntity3 implements Cloneable, IPickerViewData {
    @SerializedName("haveSpec")
    private boolean haveSpec;
    @SerializedName(value = "param", alternate = {"commentCount"})
    private String param;
    @SerializedName(value = "id", alternate = {"cid", "no", "key","count", "code"})
    private String id;
    @SerializedName(value = "name", alternate = {"areaName", "cname", "value", "projectscale", "distance","lastMsgTime"})
    private String name;
    @SerializedName("latitude")
    private String latitude;
    @SerializedName("longitude")
    private String longitude;
    @SerializedName(value = "spec", alternate = {"vals"})
    private List<ShareDictEntity3> datas;
    private boolean childCheck = false;   //商砼外加剂时候用

    private String startVal;
    private String endVal;
    private String unit;
    private int type;
    private String icon;

    public boolean isHaveSpec() {
        return haveSpec;
    }

    public void setHaveSpec(boolean haveSpec) {
        this.haveSpec = haveSpec;
    }

    private boolean checked = false;

    public ShareDictEntity3() {
    }

    public ShareDictEntity3(String id, String name) {
        this.id = id;
        this.name = name;
    }

    public ShareDictEntity3(String id, String name, List<ShareDictEntity3> list) {
        this.id = id;
        this.name = name;
        this.datas = list;
    }

    public String getId() {
        if (id == null)
            return "";
        return id;
    }

    public String getIcon() {
        return icon;
    }

    public void setIcon(String icon) {
        this.icon = icon;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getLatitude() {
        return latitude;
    }

    public void setLatitude(String latitude) {
        this.latitude = latitude;
    }

    public String getLongitude() {
        return longitude;
    }

    public void setLongitude(String longitude) {
        this.longitude = longitude;
    }

    public boolean isChecked() {
        return checked;
    }

    public void setChecked(boolean checked) {
        this.checked = checked;
    }

    public String getParam() {
        return param;
    }

    public void setParam(String param) {
        this.param = param;
    }

    public List<ShareDictEntity3> getDatas() {
        return datas;
    }

    public void setDatas(List<ShareDictEntity3> datas) {
        this.datas = datas;
    }

    public boolean isChildCheck() {
        return childCheck;
    }

    public void setChildCheck(boolean childCheck) {
        this.childCheck = childCheck;
    }

    public String getStartVal() {
        return startVal;
    }

    public void setStartVal(String startVal) {
        this.startVal = startVal;
    }

    public String getEndVal() {
        return endVal;
    }

    public void setEndVal(String endVal) {
        this.endVal = endVal;
    }

    public String getUnit() {
        return unit;
    }

    public void setUnit(String unit) {
        this.unit = unit;
    }

    public int getType() {
        return type;
    }

    public void setType(int type) {
        this.type = type;
    }

    @Override
    public ShareDictEntity3 clone() {
        try {
            ShareDictEntity3 person = (ShareDictEntity3) super.clone();
            return person;
        } catch (Exception e) {
            e.printStackTrace();
            return null;
        }
    }

    @Override
    public String getPickerViewText() {
        return name;
    }
}
